package com.example.mylibrary;


import java.util.List;

public class BaseResponse<T extends BaseModel> {

    public final static int Success = 200;
    public static int SIGN_OUT = 400;

    public String getMsg() {
        return msg;
    }

    public Optional<List<T>> transform() {
        return new Optional<>(data);
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    private String msg;
    private int code;
    private List<T> data;
}
